#ifndef _DUMP_PCI_H
#define _DUMP_PCI_H



#include "ReadoutPci.h"




VOID
DumpPCI(
        UINT16      DeviceCount,
		    PCITable    TableArray[]
){
 
 
  UINT16   Index;
  
  Index = 0;

  ST->ConOut->EnableCursor(
                            ST->ConOut,
                            FALSE
                            );
  ST->ConOut->SetAttribute(ST->ConOut, 
                 EFI_BACKGROUND_BLUE
                 );

  ST->ConOut->ClearScreen(ST->ConOut);


 

  ST->ConOut->SetCursorPosition(ST->ConOut, 0, 0);


  ST->ConOut->OutputString(ST->ConOut,L" Bus  Device  Func    VenID    DevID    SVID    SSID \n\r");
  ST->ConOut->OutputString(ST->ConOut,L" ==================================================== \n\r");
  
  for (Index = 0; Index < DeviceCount; Index++ ){
    Print(L" %-02x   %-02x      %-02x", TableArray[Index].Bus,
                                        TableArray[Index].Device,
                                        TableArray[Index].Func
                                        );
    
		Print(L"        %04x   %04x  %04x   %04x\n", TableArray[Index].PCIData.Hdr.VendorId, 
                                                 TableArray[Index].PCIData.Hdr.DeviceId, 
                                                 TableArray[Index].PCIData.Device.SubsystemVendorID, 
                                                 TableArray[Index].PCIData.Device.SubsystemID
                                                 );    
  }


  ST->ConOut->SetCursorPosition(ST->ConOut, 
                                0, 
                                24);

  Print(L"ESC = Exit   Enter = Select Device ");


};




#endif
